<?php
require_once('../config.inc');

$link = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die("Could not connect: " . mysql_error());
mysql_select_db(DB_NAME, $link) or die ('Can\'t use foo : ' . mysql_error());

$result = mysql_query("SELECT * FROM `meccano_users` WHERE `vdate` IS NOT NULL AND `vdate` < NOW()") or die("Invalid query: " . mysql_error());
while ($row = mysql_fetch_assoc($result))
{
   echo $row['login'] .'<br />';
}